package com.yanjingzheng.entity;

/**
 * @Author Yenchingcheng
 * @Date 2023/9/11 14:47
 * @Description 十进制观察类
 **/
public class OctalObserver extends Observer{

    public OctalObserver(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("Octal String: " + Integer.toOctalString(subject.getState()));
    }
}
